package org.example.design.Factory.dailyfactory;

import org.example.design.Factory.*;

/**
 * @Auther:Liu
 * @Testname:PhoneFactory
 * @Date:2025/8/15 10:39
 */
public class PhoneFactory {

    public static Phone makePhone(String Phonename) {
      return switch (Phonename) {
            case "苹果"->
                new IPhone();
            case "小米"->
                new MiPhone();
            case "Vivo"->
                new VivoPhone();
            case "Oppo"->
                new OppoPhone();
            default->
                null;
        };

    }
}
